<div ng-controller="PublicCommissionSettingController">

    <div class="clearfix">
        <div class="w120 pt16 fl">佣金发放：</div>
        <div class="radio-list pt16 fl">
            <div class="radio">
                <input type="radio" id="radio1" value="0" ng-model="data.yjff.value" ng-change="yjffChange('0')">
                <label for="radio1">自行发放</label>
            </div>
            <div class="radio" style="margin-right:0">
                <input type="radio" id="radio2" value="1" ng-model="data.yjff.value" ng-change="yjffChange('1')">
                <label for="radio2">明源云客代付</label>
            </div>
        </div>
    </div>

    <div class="clearfix pt16" data-ng-show="data.yjff.value==0">
        <div class="w120  fl" style="height: 20px;line-height: 20px;">兑换积分：</div>
        <div class="switch fl switch-off" id="exchange_btn">
            <span class="switch-text">关</span>
            <span class="switch-white"></span>
        </div>
    </div>
    <form name="exchangejf_form" novalidate data-ng-show="data.yjff.value==0">
        <table width="88%" class="mt10 pl50 border-line" style="margin-left:12%;" ng-show="data.YunParams.value == 1 && data.integral.enable == 1">
            <tbody>
            <tr>
                <td align="center" class="form-cell w120 pt10" valign="top">兑换积分限制：</td>
                <td class="pt12">
                    <div class="radio-list fl">
                        <div class="radio">
                            <input type="radio" value="0" id="exchangeMode_1" ng-model="data.integral.exchangeWay">
                            <label for="exchangeMode_1">自由兑换</label>
                        </div>
                        <div class="radio" style="margin-right:0">
                            <input type="radio" value="1" id="exchangeMode_2" ng-model="data.integral.exchangeWay">
                            <label for="exchangeMode_2">强制兑换</label>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="center" class="form-cell w120 pt10" valign="top">积分兑换比例：</td>
                <td>
                    <div>
                        <span>1元=</span>
                        <input type="number" class="input-text w50 mr10" name="proportion" ng-model="data.integral.proportion" required min="0">
                        <span>积分</span>
                        <div style="display: inline-block;" ng-messages="exchangejf_form.proportion.$error"
                             ng-show="(exchangejf_form.$submitted || exchangejf_form.proportion.$touched)&&exchangejf_form.proportion.$error.required">
                            <p class="c-red lh30" ng-message="required">请输入填写兑换比例</p>
                        </div>
                        <p class="c-red lh30" style="display: inline-block;" ng-show="data.integral.proportion<=0">积分兑换比例需大于0</p>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="center" class="form-cell w120 pt10" valign="top">积分取整规则：</td>
                <td class="pt12">
                    <div class="radio-list fl">
                        <div class="radio">
                            <input type="radio" id ="roundMode_1" value="0" ng-model="data.integral.rounding">
                            <label for="roundMode_1">四舍五入</label>
                        </div>
                        <div class="radio" style="margin-right:0">
                            <input type="radio" id ="roundMode_2" value="1" ng-model="data.integral.rounding">
                            <label for="roundMode_2">去除小数</label>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="center" class="form-cell w120 pt10 " valign="top">积分结佣说明：</td>
                <td class="pt12">
                    <div class="pb10">
                        <textarea class="textarea w400" rows="3" name="instruction" ng-model="data.integral.instruction" required maxlength='120'></textarea>
                        <span class="c-gray ml10">（积分说明限120个字，支持换行。）</span>
                        <div style="display: inline-block;" ng-messages="exchangejf_form.instruction.$error"
                             ng-show="exchangejf_form.$submitted || exchangejf_form.instruction.$touched">
                            <p class="c-red lh30" ng-message="required">请输入积分结佣说明</p>
                        </div>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
        <button type="submit" data-ng-click="exchangejf_form.$valid && saveJFsettings()" class="btn mt10 fr">保存设置</button>
    </form>
</div>